package com.youngjun.user.mapper;

import com.youngjun.common.mybatis.mapper.support.BaseMapper;
import com.youngjun.user.pojo.domain.UserRole;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {

    /**
     * 根据用户id删除用户与角色的关系
     * @param userId 用户id
     * @return int
     */
    int deleteWithLogicByUserId(Long userId);

    /**
     * 根据角色id删除用户与角色的关系
     * @param roleId 角色id
     * @return int
     */
    int deleteWithLogicByRoleId(Long roleId);

}